1. Field of the Invention
The present invention pertains to the field of controlling a host computer from a remote computer, and more particularly to host and remote computers running an operating system that uses windows for various applications and utilities. Specifically, the present invention relates to remote control of a host computer where the display viewport of the remote computer display used for the remote application to display a duplicate of the host screen image is less than the display area of the host display.
2. Discussion of the Related Art
In IBM compatible personal computers which run the Windows operating system, Symantec Corporation has developed a program called pcAnywhere for allowing remote access of a host computer from a remote computer. For example, a user""s office personal computer may have network connections, files, programs, and other capabilities which the user may want to access when the user is away from his office in which his office personal computer is located. To allow remote access using the pcAnywhere program, the user starts the pcAnywhere host application on his office (host) computer and leaves the host computer running. The host computer may be secured from unauthorized use by a passworded screen saver or other utility.
When the user desires to access the host computer from a remote computer, he dials in or connects by some other means to the host computer from a remote computer using the pcAnywhere remote application. With the increasing popularity of hand-held Windows CE computers as the remote computer, it is often not possible to duplicate the entire host computer screen image on the remote computer. The pcAnywhere remote application provides the remote user with the ability to scroll around on the host computer display. However, frequently it is not evident to a remote user to which portion of the host computer display he should pan to find the active window of the remote computer.
This phenomenon is exceptionally problematic in the context of applications running on the host computer which spawn temporary new windows requiring some user input in order to continue any activity on the host machine. For example, the remote user might be using a word processing application running in a display window on the host computer, and upon attempting to save a file within the word processing program, the word processing application might spawn a small window which would pop up in an area of the host computer display not shown on the small remote display, so that the remote user viewing the host computer display screen image through the pcAnywhere remote application display window of the remote computer would not be able to see the spawned window that required input in order to continue.
For example, if the word processing application upon being directed to save a file pops up a window that says xe2x80x9cfile already exists, replace existing file with this file?xe2x80x9d and includes yes and no buttons within the small window, then unless the small pop-up window is viewable within the pcAnywhere remote application display window of the remote computer, then the remote user may inaccurately view his system as being frozen. The remote user will not see the pop-up window of the host computer through the remote application display window, and therefore will not be able to provide the yes/no response to the pop-up window, and therefore will not be able to continue using the word processing application running on the host computer. Moreover, the remote user will not necessarily even know that the pop-up window has appeared on the host computer. The remote user will merely observe that no input into the regions of the host computer displayed on his remote display is possible, and therefore may erroneously conclude that his system has crashed.
As is apparent from the above discussion, a need exists for a method which would automatically focus or pan the remote application display screen image upon the portion of the host computer which is currently active and requiring input.
When the viewport of a remote application display window on a remote computer for remote access of a host computer is smaller than the host computer display, only a portion of the host computer screen image can be displayed on the remote application display window. If the active window of the host computer is not visible in the remote application display window, then the remote user is unable to see the active window of the host computer and may believe that the host computer is frozen, or will not be able to easily understand what is happening on the host computer. Therefore, an object of the present invention is to provide a method by which the viewport which determines which portion of the host computer display image is reproduced within the remote application display window can automatically be adjusted so as to display the portion of the host computer display image which includes the currently active host window. Another object of the present invention is to accomplish these adjustments to the contents of the remote application display window in a manner which is visually pleasing and understandable to the remote user.
According to the present invention, a remote application on a remote computer interacts with a host application on a host computer so as to present in a remote application display window of the remote computer display a portion of the host computer screen image which intersects the foreground window of the host computer. According to the present invention, a method performed by a remote application on a remote computer involves receiving a new active window message specifying an active window rectangle from the host application on the host computer, determining whether or not the moveable viewport rectangle (which defines the portion of the host computer display image to be displayed in the remote application display window of the remote computer display) intersects the active window rectangle, and moving the moveable viewport rectangle so as to intersect the active window rectangle if necessary.
In the preferred embodiment of the present invention, the new position of the moveable viewport rectangle is calculated so as to center the image of the host active window within the remote application display window if the active window rectangle""s dimensions are less than the moveable viewport rectangle""s dimensions; if the moveable viewport rectangle""s dimensions are less than the active window rectangle""s dimensions, then the new position of the moveable viewport rectangle is calculated so as to left and/or top align the moveable viewport rectangle and the active window rectangle.
According to another aspect of the preferred embodiment of the present invention, the moveable viewport rectangle is smoothly scrolled from its old position to its new position by accelerating the movement of the moveable viewport rectangle during the first half of the scroll, and decelerating the movement of the moveable viewport rectangle during the second half of the scroll. Because the scrolling operating takes a not insignificant amount of real time (on the order of one second), it is possible for one or more additional new active window messages to be sent from the host application to the remote application while a smooth scroll operation is in progress. Therefore, according to the preferred embodiment, the new active window messages are stored by the remote application in a first-in-first-out buffer upon receipt from the host application. The remote application retrieves the oldest new active window message from the first-in-first-out buffer for processing after completing a smooth scroll operation.
According to another aspect of the present invention, the host application on the host computer receives notification of a new foreground window from the host operating system by receiving a new foreground window message from the host operating system. The host application packages the information contained in the new foreground message to create a new active window message for the remote application. The new active window message created by the host application includes an active window rectangle specified by the pixel coordinates of its upper-left and lower-right corners.